﻿namespace Joyintech.Model.inpiao365
{
    using System;

    public class FileFolderInfo
    {
        private string _Ext;
        private string _FormatName;
        private string _FullName;
        private DateTime _ModifyDate;
        private string _Name;
        private long _Size;
        private string _Type;
        private string _UserName;

        public FileFolderInfo()
        {
        }

        public FileFolderInfo(string p_name, string p_fullName, string p_formatName, string p_userName, string p_ext, long p_size, string p_type, DateTime p_modifyDate)
        {
            this._Name = p_name;
            this._FullName = p_fullName;
            this._FormatName = p_formatName;
            this._UserName = p_userName;
            this._Ext = p_ext;
            this._Size = p_size;
            this._Type = p_type;
            this._ModifyDate = p_modifyDate;
        }

        public string Ext
        {
            get
            {
                return this._Ext;
            }
        }

        public string FormatModifyDate
        {
            get
            {
                return DateTime.Parse(this._ModifyDate.ToString("U")).AddHours(8.0).ToString("yyyy-MM-dd HH:mm:ss");
            }
        }

        public string FormatName
        {
            get
            {
                return this._FormatName;
            }
        }

        public string FormatSize
        {
            get
            {
                if (this._Size == 0L)
                {
                    return string.Empty;
                }
                if (this._Size.ToString().Length < 8)
                {
                    return ((this._Size / 0x400L) + " KB");
                }
                return (((this._Size / 0x400L) / 0x400L) + " MB");
            }
        }

        public string FullName
        {
            get
            {
                return this._FullName;
            }
        }

        public string Name
        {
            get
            {
                return this._Name;
            }
        }

        public string Type
        {
            get
            {
                return this._Type;
            }
        }

        public string UserName
        {
            get
            {
                return this._UserName;
            }
        }
    }
}

